forked from fl00r/go-tarantool-1.6
-
Notifications
You must be signed in to change notification settings - Fork 60
feat(arrow, datetime, decimal, uuid): add support for go-option #459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bigbes
wants to merge
1
commit into
v3
Choose a base branch
from
bigbes/tntp-3735-generate-optional-extensions
base: v3
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e3ed24c
to
913ab89
Compare
Converted to draft until go-option v1.0.0 is released. |
913ab89
to
9e1d51b
Compare
9e1d51b
to
c45b36a
Compare
oleg-jukovec
requested changes
Sep 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the patch.
Tests are missing, we need tests for new functionality in the public API.
64ac6f6
to
ae84793
Compare
macOS tests won't work for now (will be fixed by #462) |
ae84793
to
2cb114b
Compare
oleg-jukovec
requested changes
Sep 18, 2025
Please, rebase the PR. |
2cb114b
to
29cfc19
Compare
Add support for `go-option` to the `arrow`, `datetime`, `decimal`, and `uuid` packages. This allows for handling optional values of the `Arrow`, `Datetime`, `Interval`, `Decimal`, `UUID` and `BoxError` types. The following changes have been made: - Added `go:generate` directives to the `Arrow`, `Datetime`, `Interval`, `Decimal`, `UUID` and `BoxError` types to generate optional types using `github.com/tarantool/go-option/cmd/gentypes`. - Implemented `MarshalMsgpack` and `UnmarshalMsgpack` methods for the `Arrow`, `Datetime`, `Interval`, and `Decimal` types. - Added `marshalUUID` and `unmarshalUUID` functions for the `UUID` type. - The generated `_gen.go` files contain the `Optional*` types that wrap the original types and provide methods to handle optional values, including `EncodeMsgpack` and `DecodeMsgpack` for `msgpack` serialization. - Refactored the `datetime` and `decimal` decoders to use the new `UnmarshalMsgpack` methods.
29cfc19
to
7431d70
Compare
oleg-jukovec
approved these changes
Sep 19, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add support for
go-option
to thearrow
,datetime
,decimal
, anduuid
packages. This allows for handling optional values of theArrow
,Datetime
,Interval
,Decimal
, andUUID
types.The following changes have been made:
go:generate
directives to theArrow
,Datetime
,Interval
,Decimal
, andUUID
types to generate optional types usinggithub.com/tarantool/go-option/cmd/gentypes
.MarshalMsgpack
andUnmarshalMsgpack
methods for theArrow
,Datetime
,Interval
, andDecimal
types.marshalUUID
andunmarshalUUID
functions for theUUID
type._gen.go
files contain theOptional*
types that wrap the original types and provide methods to handle optional values, includingEncodeMsgpack
andDecodeMsgpack
formsgpack
serialization.datetime
anddecimal
decoders to use the newUnmarshalMsgpack
methods.Closes #TNTP-3735.